package org.shijiagen.clients;

import org.shijiagen.param.CartListParam;
import org.shijiagen.param.PageParam;
import org.shijiagen.pojo.User;
import org.shijiagen.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "user-service", url = "http://localhost:3001")
public interface UserClient {

    @PostMapping("user/admin/list")
    R adminListPage(@RequestBody PageParam param);

    @PostMapping("user/admin/remove")
    R remove(@RequestBody CartListParam param);

    @PostMapping("user/admin/update")
    R update(@RequestBody User user);

    @PostMapping("user/admin/save")
    R save(@RequestBody User user);
}
